package com.ebid.templates.twenty;

import com.ebid.templates.utils.ParameterUtils;

import java.text.MessageFormat;

public class TendererInfo {

    private static String tendererInfo="<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"+
            "<tendererInfo> \n" +
            "    <tendererCodeType>{0}</tendererCodeType>\n" +
            "    <tendererCode>{1}</tendererCode>\n" +
            "    <tendererName>{2}</tendererName>\n" +
            "    <bidSectionCode>{3}</bidSectionCode>\n" +
            "    <artificialPerson>{4}</artificialPerson>\n" +
            "    <artificialPersonCodeType>{5}</artificialPersonCodeType>\n" +
            "    <artificialPersonCode>{6}</artificialPersonCode>\n" +
            "    <contactNumber>{7}</contactNumber>\n" +
            "    <participantType>{8}</participantType>\n" +
            "    <countryRegion>{9}</countryRegion>\n" +
            "    <unitNature>{10}</unitNature>\n" +
            "    <regionCode>{11}</regionCode>\n" +
            "    <industryCode>{12}</industryCode>\n" +
            "    <licNumber>{13}</licNumber>\n" +
            "    <caCode>{14}</caCode>\n" +
            "    <taxNumber>{15}</taxNumber>\n" +
            "    <creditRate>{16}</creditRate>\n" +
            "    <openingBank>{17}</openingBank>\n" +
            "    <basicAccount>{18}</basicAccount>\n" +
            "    <regCapital>{19}</regCapital>\n" +
            "    <regCapCurrency>{20}</regCapCurrency>\n" +
            "    <regUnit>{21}</regUnit>\n" +
            "    <infoReporterName>{22}</infoReporterName>\n" +
            "    <infoReporterCodeType>{23}</infoReporterCodeType>\n" +
            "    <infoReporterCode>{24}</infoReporterCode>\n" +
            "    <infoReporterContactNumber>{25}</infoReporterContactNumber>\n" +
            "    <contactAddress>{26}</contactAddress>\n" +
            "    <zipCode>{27}</zipCode>\n" +
            "    <email>{28}</email>\n" +
            "    <platfVerifier>{29}</platfVerifier>\n" +
            "    <platfVerifierTime>{30}</platfVerifierTime>\n" +
            "    <verifyTime>{31}</verifyTime>\n" +
            "    <platformCode>{32}</platformCode>\n" +
            "    <platformName>{33}</platformName>\n" +
            "    <examinerName>{34}</examinerName>\n" +
            "    <examinerCodeType>{35}</examinerCodeType>\n" +
            "    <examinerCode>{36}</examinerCode>\n" +
            "    <organizationAttachmentCode>{37}</organizationAttachmentCode>\n" +
            "    <licAttachmentCode>{38}</licAttachmentCode>\n" +
            "    <taxAttachmentCode>{39}</taxAttachmentCode>\n" +
            "    <version>{40}</version>\n" +
            "</tendererInfo>";


    public static void setTendererInfo(String tendererInfo,String s0,String s1,String s2,String s3,String s4,String s5,String s6,String s7,String s8,String s9,String s10
            ,String s11,String s12,String s13,String s14,String s15,String s16,String s17,String s18,String s19,String s20
            ,String s21,String s22,String s23,String s24,String s25,String s26,String s27,String s28,String s29,String s30
            ,String s31,String s32,String s33,String s34,String s35,String s36,String s37,String s38,String s39,String s40) {
        TendererInfo.tendererInfo = MessageFormat.format(tendererInfo,s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,
                s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,s24,s25,s26,s27,s28,s29,s30,
                s31,s32,s33,s34,s35,s36,s37,s38,s39,s40);
    }

    public static void setTendererInfo(){
        setTendererInfo(tendererInfo, ParameterUtils.get("tendererCodeType"),
                                    ParameterUtils.get("tendererCode"),
                                    ParameterUtils.get("tendererName"),
                                    ParameterUtils.get("bidSectionCode"),
                                    ParameterUtils.get("artificialPerson"),
                                    ParameterUtils.get("artificialPersonCodeType"),
                                    ParameterUtils.get("artificialPersonCode"),
                                    ParameterUtils.get("contactNumber"),
                                    ParameterUtils.get("participantType"),
                                    ParameterUtils.get("countryRegion"),
                                    ParameterUtils.get("unitNature"),
                                    ParameterUtils.get("regionCode"),
                                    ParameterUtils.get("industryCode"),
                                    ParameterUtils.get("licNumber"),
                                    ParameterUtils.get("caCode"),
                                    ParameterUtils.get("taxNumber"),
                                    ParameterUtils.get("creditRate"),
                                    ParameterUtils.get("openingBank"),
                                    ParameterUtils.get("basicAccount"),
                                    ParameterUtils.get("regCapital"),
                                    ParameterUtils.get("regCapCurrency"),
                                    ParameterUtils.get("regUnit"),
                                    ParameterUtils.get("infoReporterName"),
                                    ParameterUtils.get("infoReporterCodeType"),
                                    ParameterUtils.get("infoReporterCode"),
                                    ParameterUtils.get("infoReporterContactNumber"),
                                    ParameterUtils.get("contactAddress"),
                                    ParameterUtils.get("zipCode"),
                                    ParameterUtils.get("email"),
                                    ParameterUtils.get("platfVerifier"),
                                    ParameterUtils.get("platfVerifierTime"),
                                    ParameterUtils.get("verifyTime"),
                                    ParameterUtils.get("platformCode"),
                                    ParameterUtils.get("platformName"),
                                    ParameterUtils.get("examinerName"),
                                    ParameterUtils.get("examinerCodeType"),
                                    ParameterUtils.get("examinerCode"),
                                    ParameterUtils.get("organizationAttachmentCode"),
                                    ParameterUtils.get("licAttachmentCode"),
                                    ParameterUtils.get("taxAttachmentCode"),
                                    ParameterUtils.get("version")
                );
    }

    public static void main(String[] args) {
        setTendererInfo();
        System.out.println(tendererInfo);
    }
}
